package com.woniuxy.cloud52.order.web;

import com.woniuxy.cloud.UserAPI;
import com.woniuxy.cloud.form.UserForm;
import com.woniuxy.cloud.ticket52.OrderUserAPI;
import com.woniuxy.cloud.ticket52.common.result.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class OrderUserController implements OrderUserAPI {

    @Autowired
    private UserAPI userClient;

    public Result register(String username, String password){
        UserForm userForm = new UserForm();
        userForm.setUsername(username);
        userForm.setPassword(password);
        return  userClient.register(userForm,"");
    }


    public Result modifyPassword(String username,String password){

        return  userClient.modifyPassword(1,password);
    }

    public Result getUserInfo(String username,String password){

        return  userClient.getUserInfo(1);
    }

}
